<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="BaseTable">

    <div class="layui-card-body padding-left-40">

        <div class="layui-form-item label-required-prev">
            <div class="help-label"><b>{:lang('配置类型')}</b></div>
            <select class="layui-select"  disabled>
                <option value=''>{:lang('请选择')}</option>
                {foreach $types as  $code => $typeName}
                {if  $code  eq input('get.type')}
                <option selected value="{$code}">{$typeName}</option>
                {else}
                <option value="{$code}">{$typeName}</option>
                {/if}
                {/foreach}
            </select>
            <input maxlength="50" class="layui-input" type='hidden' name="type" value='{$type}' required >
            <p class="help-block">{:lang('请选择配置类型，数据创建后不能再次修改哦')} ~</p>
        </div>

        {if $super }
        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('所属平台')}</b>Affiliated Company</span>
            <select name="account_id"  lay-search required>
                <!--                <option value=''>&#45;&#45; {:lang('全部')} &#45;&#45;</option>-->
                {foreach $companys as $k=>$v}
                {if isset($vo.account_id) and $vo.account_id eq $v['id'].""}
                <option selected value="{$v['id']}">{$v['title']}</option>
                {else}
                <option value="{$v['id']}">{$v['title']}</option>
                {/if}
                {/foreach}
            </select>
            <!--            <span class="help-block">请输入新的数据编码，数据创建后不能再次修改，同种数据类型的数据编码不能出现重复 ~</span>-->
        </label>
        {else/}
        <input type="hidden" name="account_id" value='{$vo.account_id|default=$adminUser.account_id}'>
        {/if}

        <div class="layui-form-item label-required-prev">
            <label class="help-label">{:lang('配置名称')}</label>
            <select class="layui-select" {if isset($vo.group)} disabled {/if} name="group">
                <option value=''></option>
                {foreach $group as $v}
                {if isset($vo.group) && ($vo.group eq $v['code'])}
                <option selected value="{$v['code']}">{$v['name']}</option>
                {else /}
                <option value="{$v['code']}">{$v['name']}</option>
                {/if}
                {/foreach}
            </select>
            {if isset($vo.group)}
                <input maxlength="50" class="layui-input" type='hidden' name="group" value='{$vo.group|default=""}' required >
            {/if}
        </div>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('配置别名')}</b></span>
            <input maxlength="100" class="layui-input" name="alias_name" value='{$vo.alias_name|default=""}' required vali-name="{:lang('配置别名')}" placeholder="{:lang('请输入配置别名')}">
            <span class="help-block">{:lang('请输入当前配置名称，不起别名与配置名称保持一致即可')} ~</span>
        </label>
        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('排序')}</b></span>
            <input  type="number" class="layui-input" name="sort" value='{$vo.sort|default=0}'  placeholder="请输入序号">
            <span class="help-block">{:lang('请输入序号')} ~</span>
        </label>
        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('备注')}</b></span>
            <textarea name="note" class="layui-textarea" placeholder="{:lang('请输入备注')}">{$vo.note|default=''}</textarea>
        </label>

    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="{:lang('确定要取消编辑吗？')}" data-close>{:lang('取消编辑')}</button>
    </div>

</form>